import React from "react";
import { connect } from "react-redux";
import { Layout } from "antd";
import Logo from '@/components/tools/Logo'
import Menu from "./menu";
const { Sider } = Layout;

const LayoutSider = (props) => {
	const { sidebarCollapsed, sidebarLogo } = props;
	return (
		<Sider 
			className="sider"
			width={256}
			collapsible
			collapsed={sidebarCollapsed}
			trigger={null}
		>
			{sidebarLogo ? <Logo /> : null}
			<Menu />
		</Sider>
	);
};

const mapStateToProps = (state) => {
  return {
    ...state.app,
    ...state.settings,
  };
};
export default connect(mapStateToProps)(LayoutSider);
